package com.dxt.springmvcdemo.service;

import com.dxt.springmvcdemo.mapper.EmployeeMapper;
import com.dxt.springmvcdemo.pojo.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * BelongProject: springMVC
 * BelongPackage: com.dxt.springmvcdemo.service
 * Description:
 *
 * @Author 段鑫涛
 * @Create 2025/4/14 19:22
 * @Version 1.0
 */
@Service
public class EmployeeServiceImpl implements EmployeeService{
    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public Employee getEmployeeById(Long id) {
        return employeeMapper.getEmployeeById(id);
    }

    @Override
    public List<Employee> getEmployeeList() {
        return employeeMapper.getEmployeeList();
    }

    @Override
    public void insertEmployee(Employee employee) {
        employeeMapper.insertEmployee(employee);
    }

    @Override
    public void deleteEmployeeById(Long id) {
        employeeMapper.deleteEmployeeById(id);
    }

    @Override
    public void updateEmployee(Employee employee) {
        employeeMapper.updateEmployee(employee);
    }
}
